package com.cn.lp.export.server.base;

import com.cn.lp.export.server.base.context.IDCreator;
import com.cn.lp.export.server.entity.executor.ExportExecutor;
import com.cn.lp.export.server.entity.executor.LocalFileSystemExportExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 公用配置
 *
 * @author zhanyao
 */
@Configuration
public class ExportServerConfig {

    @Bean
    public IDCreator<Long> createIDCreator() {
        return new SnowFlake(0, 0);
    }

    /**
     * 导出执行器
     * @return
     */
    @Bean
    public ExportExecutor createExportExecutor() {
        return new LocalFileSystemExportExecutor();
    }

}
